package com.muhuahealth.service.impl;

import com.muhuahealth.dao.AdminDao;
import com.muhuahealth.entity.AdminEntity;
import com.muhuahealth.service.AdminService;
import com.muhuahealth.utils.Md5Util;
import jdk.nashorn.internal.ir.annotations.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.UUID;

/**
 * @author GSK
 * @version 1.0
 * @date 2020/12/30 21:13
 */
@Service
public class AdminServiceImpl implements AdminService {

    @Resource
    AdminDao adminDao;

    @Override
    public AdminEntity login(String userName, String password) {

        String passwordMd5 = Md5Util.MD5Encode(password,"UTF-8");
        return adminDao.login(userName,passwordMd5);
    }
}
